{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# How to Use a RISC-V Processor in PYNQ\n",
    "\n",
    "Welcome! This tutorial will walk you through the steps of creating a RISC-V Processor overlay. This guide has five parts:\n",
    "\n",
    "1. [Downloading Dependencies](1-Downloading-And-Configuring.ipynb)\n",
    "2. [Creating a FPGA Bitstream](2-Creating-A-Bitstream.ipynb)\n",
    "3. [Compiling the RISC-V GCC Toolchain](3-Compiling-RISC-V-GCC-Toolchain.ipynb)\n",
    "4. [Packaging a RISC-V Overlay](4-Packaging-An-Overlay.ipynb)\n",
    "\n",
    "At the end of this guide you will know how to:\n",
    "\n",
    "1. Package a RISC-V Processor as a Vivado IP\n",
    "2. Create a RISC-V Processor Bitstream in Vivado IP Integrator\n",
    "3. Compile the RISC-V GCC Toolchain\n",
    "4. Package, Install, and Load a custom PYNQ overlay\n",
    "5. Use an IPython Magic to Compile C/C++ or Assembly code. \n",
    "\n",
    "In summary once you have finished this guide, you can apply the same steps to any RISC-V processor implementation with standard interfaces like, BRAM, LMB, AXI4, AXI4Lite, Avalon, AHB and Wishbone."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Getting Started\n",
    "\n",
    "To complete this guide you will need a PYNQ board and a host computer. Both should have an internet connection, but only the host requires it.\n",
    "\n",
    "To test the internet connection on your host click on the following link to navigate to the [PYNQ Documentation Website](pynq.rtfd.io)\n",
    "\n",
    "To test the internet connection on your PYNQ board run the following cell. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!ping xilinx.com -c 10"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## A Stylistc Note:\n",
    "\n",
    "Instructions to be run on your host computer will be in `monospace font`. An example is shown below."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "Run the following command in your host computer's terminal: \n",
    "\n",
    "    git clone https://github.com/octocat/Spoon-Knife\n",
    "    \n",
    "This will clone the tutorial git repository from GitHub to your host computer. \n",
    "\n",
    "In Windows, the same command can be run in [Cygwin](https://cygwin.com/index.html) with git installed."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Instructions that will be run on your PYNQ board will be in Jupyter Notebook cells like in the following example. Executing the following cell will run on your PYNQ board"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!git clone https://github.com/octocat/Spoon-Knife /home/xilinx/Spoon-Knife"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
